"The Performer"
Read the IRIS Performer 2.0 Release Notes
View a complete listing of the IRIS Performer 2.0 API
IRIS Performer is an integral part of the Onyx/RealityEngine and Indigo2/Impact visual simulation systems and provides interfaces to the advanced features of RealityEngine class graphics. IRIS Performer is compatible with all SGI graphics platforms and attains maximum performance on each. IRIS Performer provides an extensible basis for creating real-time 3D graphics applications in the fields of visual simulation, entertainment, virtual reality, broadcast video, and computer aided design. IRIS Performer is the flexible, intuitive, toolkit-based solution for developers who want to optimize performance on Silicon Graphics systems.
The basis of IRIS Performer is the performance rendering library libpr, a low level library providing high speed rendering functions based on pfGeoSets, efficient graphics state control using pfGeoStates, and other application-neutral functions. Layered above libpr is libpf, a real-time visual simulation environment providing a high-performance multi-processing database rendering system that takes best advantage of IRIS symmetric multiprocessing CPU hardware. The database utility library libpfdu provides powerful functions for defining both geometric and appearance attributes of three dimensional objects, encourages sharing of state and materials, and generates efficient triangle strips from independent polygonal input. The database library libpfdb uses the facilities of libpfdu, libpf, and libpr to import database files in many popular industry standard database formats. These loaders also serve as a guide to developers creating new database importers. libpfui contains the user interface, and input management facilities common to many interactive applications. Completing the suite of libraries is libpfutil, the IRIS Performer utility library. It provides a collection of important convenience routines implementing such diverse tasks as smoke effects, MultiChannel Option support, graphical user interface tools, input event collection and handling, and various traversal functions.
In addition to these SGI-developed tools, IRIS Performer also includes sample code, databases, games, and movies contributed by the Friends of Performer: companies and individuals with services of general interest to the IRIS Performer community.
Once the application has created a graphical rendering environment as shown above, the remaining task is to iterate through a main simulation loop once per frame.
GeoStates provide graphics state definitions (e.g. texture or material) for GeoSets. When used in conjunction with Performer state management functions, GeoSets can be rendered in a prescribed way without concern for the inherited modes of the graphics pipeline. GeoSets may share GeoStates. Less-used machine modes are not supported.
Display Lists are supported in IRIS Performer These are not typical graphics library display lists, but rather simple token and data mechanisms that do not cache geometry or state data and are designed to allow efficient multiprocessing. These display lists use IRIS Performer state and rendering commands. They also support function callbacks to allow application programs to perform any required special processing during display list rendering.
Windows for IRIS GL, IRIS GL mixed model (GLX), and OpenGL applications can be configured, created and managed with the pfWindow routines.
Math Support is provided by an extensive set of point, segment, vector, plane, matrix, cylinder, sphere and frustum functions.
Intersection and collision detection functions are provided to test for the intersection of line segments with cylinders, spheres, boxes, planes, and geometry. Intersection functions for spheres, cylinders, and frusta are also provided.
ColorTables are supported by allowing GeoSet color indexes to refer to common tables of RGBA color information. Color tables are global and may be of any size. Any number of color tables may exist at one time and they can be activated at any time. The active color table may be switched in real-time without performance impact.
Asynchronous File I/O is provided by a simple non-blocking file access method. This is provided to allow applications to retrieve file data during real-time operation.
Memory Allocation is supported with routines to allocate memory from process heap storage, shared memory arenas, and datapool memory. Shared arenas must be used when multiple processes need to access data. The arena is created by the application program. Datapools allow applications to create shared arenas visible to any process where allocations can be locked for easy mutual exclusion on a per allocation basis.
High Speed Clock support is based on a high speed clock access routine that reports elapsed time in seconds as a double precision floating point number to highest machine resolution.
Statistics are maintained by IRIS Performer on the geometry that is drawn, state changes, transformations, and most internal operations. These statistics can used for application tuning and form the basis for IRIS Performer's automatic system load management.
The simulation, culling, and drawing for a graphics pipeline may be combined into one, two or three processes to allow an application to be tailored to different hardware and expected CPU demand in each process. For example, culling and drawing are normally done by separate processes in order to obtain maximum graphics performance, but if an application is simulation bound, it may wish to combine both cull and draw into a single process.
Statistics are maintained for each IRIS Performer process - application, cull and draw. These statistics can be displayed in a channel, printed, and queried using the pfFrameStats routines.
pfNode General node (base class) pfScene Top level node. pfGroup Node with multiple children. pfSCS Static coordinate system. pfDCS Dynamic coordinate system. pfLayer Layer or decal node. pfLOD Level of detail node. pfSwitch Switch node. pfSequence Sequential animation node. pfGeode Fundamental geometry node. pfBillboard Special tracking leaf node. pfLightPoint One or more emissive light points. pfLightSource Definition of a graphics hardware light. pfPartition Special culling acceleration node. pfText 2D and 3D text geometry. pfMorph Geometry morphing node.Each of these is derived from pfNode and any function which requires a pfNode* as an argument can accept any of the above types. Similarly pfSCS, pfDCS, pfLOD, pfSequence and pfSwitch are derived from pfGroup and can be used in any function which takes a pfGroup* as an argument.
Nodes can be assembled into a directed graph to represent a scene with its modeling hierarchy. Geometry and graphics state information is contained in pfGeoStates and pfGeoSets which are attached to pfGeodes.
Intersection inquiries are made via groups of line segments which can be tested against a subgraph of the scene. Masks and callbacks can be specified to allow evaluation of line-of-sight visibility, collisions, and terrain intersections. libpf also provides earth-sky and weather functions for modeling fog, haze and other atmospheric effects.
libpfdu contains many utilities, including DSO support for database loaders and their modes, file path support, and so on, but the heart of libpfdu is the IRIS Performer database builder and geometry builder. The builders are tools that allow users to input or output a collection of geometry and graphics state in immediate mode.
Users send geometric primitives one at a time, each with its corresponding graphics state, to the builder. When the builder has received all the data, the user simply requests optimized IRIS Performer data structures which can then be used as a part of a scene graph. The builder hashes geometry into different `bins' based on the geometry's attribute binding types and associated graphics state. It also keeps track of graphics state elements (textures, materials, light models, fog, and so on) and shares state elements whenever possible. Finally, the builder creates pfGeoSets that contain triangle meshes created by running the original geometry through the libpfdu triangle-meshing utility.
To go along with each pfGeoSet, the builder creates a pfGeoState (IRIS Performer's encapsulated state primitive). The builder generates pfGeoStates that share as many attributes as possible with other pfGeoStates in the scene graph.
Having created these primitives (pfGeoSets and pfGeoStates) the builder will place them in a leaf node (pfGeode), and optionally create a spatial hierarchy by running the new database through a spatial breakup utility function which is also contained in libpfdu.
Note that the builder also allows the user to extend the notion of a graphics state by registering callback functionality through builder API and then treating this state or functionality like any other IRIS Performer state or mode (although such uses of the builder are slightly more complicated). In short, libpfdu is a collection of utilities that effectively act as a data funnel where users enter flattened 3D graphics information and are given in return fully functional and optimized IRIS Performer run-time structures.
Processor control enables the user to specify which CPU a particular Performer process runs on and to devote a particular processor to a given process.
Multiprocess rendezvous lets master and slave processes synchronize in a multiprocessing environment.
GLX mixed model routines are provided for compatibility with previous versions of IRIS Performer Current development should be based on the pfWindow and pfPipeWindow routines that provide a single API for managing IRIS GL, IRIS GL mixed model, and OpenGL windows.
GL and X input handling is handled by an exhaustive set of commands that operate on compressed, space-efficient queues of events.
Cursor control is provided to easily manipulate the cursors associated with each window managed by IRIS Performer.
X fonts are supported so that they can be used to draw text in IRIS Performer windows. The main task of these functions is to simplify the use of X fonts and present a high-level interface to the user.
Graphical User Interfaces (GUIs) are made easily accessible to the user through a set of functions that provide simple means to create a GUI, set up widgets, manipulate them, set user-defined functions to control their behavior and do other common tasks.
Scene graph traversal routines provide for different, highly-customizable traversal mechanisms for the IRIS Performer scene graph.
MultiChannel Option (MCO) is supported on RealityEngine graphics systems by a set of functions that generically initialize channels for using MCO.
Path following mechanisms allow the user to follow a pre-defined path in a walkthrough application. Functions to create paths are also provided.
Various draw styles like haloed lines and wireframe images are supported as a demonstration of the uses of multi-pass rendering.
Other utilities supported are for timer control to track time in real-time independently of the frame-rate, managing hash tables, a simple geometric simplification scheme for generating very simple level-of-detail representations of the scene graph, texture loading and texture animation, random number generation, flybox control, smoke and fire simulation and converting light point states into textures.
The loaders in libpfdb have been developed by Silicon Graphics, by modeling tool vendors, and by Performer customers. Many are provided in source form as part of this IRIS Performer distribution. Use these loaders as templates to write custom loaders for whatever formats you require in your applications. The different kinds of file formats supported by IRIS Performer are listed below
3ds AutoDesk 3DStudio binary data bin Minor SGI format used by powerflip bpoly Side Effects Software PRISMS binary byu Brigham Young University CAD/FEA data dwb Coryphaeus Software Designer's Workbench dxf AutoDesk AutoCAD ASCII format flt11 MultiGen public domain Flight v11 format flt14 MultiGen OpenFlight v14 format gds McDonnell-Douglas GDS things data gfo Minor SGI format (radiosity output) im Minor SGI format (IRIS Performer example) irtp AAI/Graphicon Interactive Real-Time PHIGS iv SGI OpenInventor / Silicon Studio Keystone lsa Lightscape Technologies radiosity (ASCII) lsb Lightscape Technologies radiosity (binary) m University of Washington mesh data medit Medit Productions medit modeling tool nff Eric Haines' ray tracing test data format obj Wavefront Technologies data format phd Minor SGI format (polyhedra) poly Side Effects Software PRISMS ASCII data pts University of Washington point data ptu Minor SGI format (IRIS Performer example) s1k US ARMY SIMNET databases (Texas Instruments) sgf US NAVY standard graphics format sgo Minor SGI format spf US NAVY simple polygon format sponge Sierpinski sponge 3D fractal generator star Yale University compact star chart data stla 3D Structures Stereolithography (ASCII) stlb 3D Structures Stereolithography (binary) sv Format of John Kichury's i3dm modeler tri University of Minnesota Geometry Center data unc University of North Carolina dataSource code for many of these loaders is provided with IRIS Performer. Loader source code is located in and below the directory
Each of the libpf, libpr, libpfdu, libpfdb, libpfui, and libpfutil functions also has a complete reference page description available via the IRIX man and xman commands. Refer to these reference pages for a thorough discussion of the functions and data types, features and limitations, performance and resource implications, and sample code showing how these functions are used in practice.
All type, command and token names, associated with libpf or libpr are preceded by the letters pf, denoting the IRIS Performer library.
Functions from the other libraries also affix an identifying letter suffix (d, i, or u) to the pf prefix for scope resolution purposes.
Library | Prefix | Example ___________|________|________________________ libpf | pf | pfNewGeode libpr | pf | pfNewGSet libpfdu | pfd | pfdNewGeom libpfdb | pfd | pfdLoadFile_medit libpfui | pfi | pfiResetXformerPosition libpfutil | pfu | pfuDownloadTexListCommand and type names are mixed-case, while token names are uppercase. For example, pfTexture is a type name and PFTEX_SHARPEN is a token name. Underscores are not used in function names except in the libpfdb libraries, where the underscore serves to separate the common loader name (pfdLoad) from the file type extension (medit in the example above).
In type names, the part following the pf is usually spelled out in full, as is the case with pfTexture, but in some cases a shortened form of the word is used. For example, pfDispList is the name of the display-list type.
Much of IRIS Performer's interface involves setting parameters and retrieving parameter values. For the sake of brevity, the word Set is omitted from function names, so that instead of pfSetMtlColor, pfMtlColor is the name of the routine used for setting the color of a pfMaterial. Get, however, is not omitted from the names of routines that get information, such as pfGetMtlColor.
Routine names are constructed by appending a type name to an operation name. The operation name always precedes the type name. In this case, the operation name is unabbreviated and the type name is abbreviated. For example, the name of the routine that applies a pfTexture is pfApplyTex.
Compound type names are abbreviated by the first initial of the first word and the entire second word. For example, to draw a display list, which is type pfDispList, use pfDrawDList.
Symbolic token names incorporate another abbreviation, usually shorter, of the type name. For example
Other tokens and identifiers follow the conventions of ANSI C and C++ wherein a valid identifier consists of upper and lower-case alphabetic characters, digits, and underscores, and the first character is not a digit.
Compiled by: Allan Schaffer